package practice05;

public class Worker extends Person{
    //再写一个Worker类继承Person类，只有name，age属性。也有一个introduce方法，
    //introduce方法返回一个字符串形如：
    //>My name is Tom. I am 21 years old. I am a Worker. I have a job.
    private int klass;
    public Worker(String name, int age) {
        super(name,age);
    }
    public int getKlass() {
        return klass;
    }
    public void setKlass(int klass) {
        this.klass = klass;
    }
    public String introduce(){
        return super.introduce()+" I am a Worker. I have a job.";
    }

}
